FROM nginx:1.24-alpine3.17
LABEL authors="zhangzhiling"

RUN sed -i 's|index  index.html index.htm;|try_files $uri $uri/ /index.html;|' /etc/nginx/conf.d/default.conf

# 将编译得到的静态文件复制到nginx的静态文件目录
COPY dist/ /usr/share/nginx/html

# 暴露80端口
EXPOSE 80

# 启动nginx
CMD ["nginx", "-g", "daemon off;"]
